package com.by.yz.mypersonal;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.by.yz.R;
import com.by.yz.activity.base.BaseActivity;
import com.by.yz.common.MFGT;

/**
 * Created by 123 on 2016/10/7.
 */
public class PersonalContractActivity extends BaseActivity  implements View.OnClickListener {

    private LinearLayout newfriend;
    private LinearLayout near;
    private Button message;
    private Button set;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.personal_contract);
        setToolbarTitle("联系人");

        initView();
        initDatas();

    }

    private void initDatas() {

    }

    private void initView() {

        newfriend = (LinearLayout) findViewById(R.id.layout_new);
        newfriend.setOnClickListener(this);

        near = (LinearLayout) findViewById(R.id.layout_near);
        near.setOnClickListener(this);

//        set = (Button) findViewById(R.id.btn_set);
//        set.setOnClickListener(this);
//
//        message = (Button) findViewById(R.id.btn_message);
//        message.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){

            case R.id.layout_new:
                MFGT.startActivity(this, PersonalNewFriendActivity.class);
                break;

            case R.id.layout_near:
                MFGT.startActivity(this, PersonalNearPeopleActivity.class);
                break;

//            case R.id.btn_set:
//                MFGT.startActivity(this, PersonalContractSetActivity.class);
//                this.finish();
//                break;
//
//            case R.id.btn_message:
//                MFGT.startActivity(this, PersonalContractChatActivity.class);
//                this.finish();
//                break;

        }
    }

//    @Override
//    public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true;
//        getMenuInflater().inflate(R.menu.mm, menu);
//        return true;
//    }

//    @Override
//    public boolean onOptionsItemSelected(MenuItem item) {
//        switch (item.getItemId()) {
//           case android.R.id.home:
//                Toast.makeText(this, "home", Toast.LENGTH_SHORT).show();
//                return true;
//            case R.id.m1:
//                Toast.makeText(this, "m1", Toast.LENGTH_SHORT).show();
//                break;
//            case R.id.m2:
//                Toast.makeText(this, "m2", Toast.LENGTH_SHORT).show();
//                break;
//
//        }
//        return super.onOptionsItemSelected(item);
//    }
}
